#!/usr/bin/env python
# encoding: utf-8

"""
@author: Cao
@contact: caoqiang0012@163.com
@file: parse_station.py
@time: 12/12/2016 2:53 PM
"""
import re
import requests
from pprint import pprint

url = "https://kyfw.12306.cn/otn/resources/js/framework/station_name.js?station_version=1.8986"
response = requests.get(url, verify=False)

stations = re.findall(u'([\u4e00-\u9fa5]+)\|([A-Z]+)', response.text)
pprint(dict(stations), indent=4)